package com.gadgets.busi.bm05.common;

import com.gadgets.framework.common.dto.BaseDTO;
import com.gadgets.framework.common.util.DateUtils;

import java.util.Date;

/**
 * @author UncleXiu
 * @version V1.0.0
 * @data 2022-03-02
 */
public class SVNTagsCommitDTO extends BaseDTO implements Comparable<SVNTagsCommitDTO> {
    /**
     * 版本号
     */
    private Long version;
    /**
     * 提交人
     */
    private String author;
    /**
     * 提交信息
     */
    private String comomitComment;
    /**
     * 提交日期
     */
    private String commitDate;
    /**
     * 文件
     */
    private String fileName;

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public Long getVersion() {
        return version;
    }

    public void setVersion(Long version) {
        this.version = version;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getComomitComment() {
        return comomitComment;
    }

    public void setComomitComment(String comomitComment) {
        this.comomitComment = comomitComment;
    }

    public String getCommitDate() {
        return commitDate;
    }

    public void setCommitDate(Date commitDate) {
        this.commitDate = DateUtils.getDate10bitForParam(commitDate);
    }

    @Override
    public int compareTo(SVNTagsCommitDTO o) {
        return (int)(o.getVersion()-this.getVersion());
    }

}
